SYNTAXDEF request
FOR <http://www.cool-software.org/requests>
//START Request
START Workflow

IMPORTS {
	ecl : <http://www.cool-software.org/ecl> 
		<org.coolsoftware.ecl/metamodel/ecl.genmodel>
		WITH SYNTAX ecl <../../org.coolsoftware.ecl/metamodel/ecl.cs>		
}

OPTIONS {
	reloadGeneratorModel = "true";
	//overrideClasspath = "false";
	//overrideManifest = "false";
	//overridePluginXML = "false";
	additionalLibraries = "lib/lpsolve55j.jar,lib/sat4j-pb.jar";
	additionalDependencies = "org.coolsoftware.coolcomponents.exlastssions.interlastter,org.eclipse.jface,org.eclipse.emf.ecore.xmi";
	additionalExports = "org.coolsoftware.requests.resource.request.analysis.util";
	disableDebugSupport = "true";
	disableLaunchSupport = "true";
}

TOKENS {
	DEFINE SL_COMMENT				$ '--'(~('\n'|'\r'|'\uffff'))* $ COLLECT IN comments;
	DEFINE ML_COMMENT				$ '/*'.*'*/'$ COLLECT IN comments;
	
	DEFINE FILE_NAME
		$ '[' (('A' .. 'Z' | 'a'..'z') ':' '/')? ('.' | '/') ('A'..'Z' | 'a'..'z' | '0'..'9' | '_' | '-' | '/' | '.' | ' ')+ ']' $;
}

TOKENSTYLES {
	"ML_COMMENT" COLOR #008000, ITALIC;
	"SL_COMMENT" COLOR #008000, ITALIC;
}

RULES {

	Workflow	::= "workflow" "begin" "{" (tasks)+ (activities )+ ( controls )+ "}";
	
	Task		::= "task" name[] "{"
					"import" "usermodel" usermodel[FILE_NAME]
					"user" user[]
					"call" "request:" "{" reqs "}"
					"}";
					
	Activity	::= "activity" name[] "{" ("call" tasks[] ";")* ( controls )* "}";
	 
	Call		::= (last[])? "call" next[] ";"; 
	
	Join		::=  last[] ("," last[])+ "join:" ("begin" "parallel" )? 
					 ("{" ("call" next[] ";")+ "}")+
					 ("end" "parallel")? ;
				
	Split		::= (last[])? "split:" ("begin" "parallel")? 
					"{"  ("call" next[] ";")+ "}"
					("{"  ("call" next[] ";")+ "}")+ 
					("end" "parallel")?;
	
				
	// syntax definition for class 'StartMetaClass'
	Request   ::= import !0 hardware !0 "call" #1 component[]"."target[] "expecting" #1 "{" !1 reqs* !0 "}";
	
	Import    ::= "import" #0 "ccm" model[FILE_NAME];
	
	Platform  ::= "target" #0 "platform" #0 hwmodel[FILE_NAME];
	
}